# Reference: <https://postmarketos.org/devicepkg>
# Maintainer: Robert Eckelmann <longnoserob@postmarketos.org>

pkgname=device-solidrun-cubox
pkgdesc="SolidRun CuBox"
pkgver=2
pkgrel=1
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="
	linux-postmarketos-marvell
	postmarketos-base
	u-boot-tools
"
makedepends="devicepkg-dev"
source="
	deviceinfo
	boot.cmd
"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
	mkimage -A arm -O linux -T script -C none -n "uBoot commands" -d "$srcdir"/boot.cmd "$srcdir"/boot.scr
	install -Dm755 "$srcdir"/boot.cmd "$pkgdir"/boot/boot.cmd
	install -Dm755 "$srcdir"/boot.scr "$pkgdir"/boot/boot.scr
}

sha512sums="
4f88da4282205b1b803ccc1b6854aaada15b509c9401ef35ae8110fec27e932ae38b94387272b628a85f15dfe5bcc436ed93c5f55881defd580dd5c2a999703e  deviceinfo
c651eb52066d6a8aa48388b391de0c9a4d85369adce3d2228bd3dfaa4d3ab797dbeca6965d5e3b898a378cb9d52215f946e497c44fc37b5fc668ec79d5f24ffc  boot.cmd
"
